package com.antler.smt.admin.controller;

import com.antler.smt.admin.annotation.OperateCut;
import com.antler.smt.admin.utils.ShiroUtils;
import com.antler.smt.response.base.Result;
import com.antler.smt.service.admin.PeopleService;
import com.antler.smt.utils.LogUtil;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 获取人员信息，需求列表
 *
 * @author zhangyi
 * @date 2018/7/17 11:56
 */
@RestController
@RequestMapping("/list")
public class ConditionListController {
    /**
     * 日志
     */
    private Logger log = LogUtil.get();

    @Resource
    private PeopleService peopleService;

    /**
     * 获取人员认证信息列表
     *
     * @return
     */
    @GetMapping("/peopleList")
    @ApiOperation(value = "获取所有人注册的信息列表（包括工程师和工人）",httpMethod = "GET")
    @OperateCut(content = "查看所有注册人员的信息")
    public Result getPeopleList(){
        return peopleService.peopleList(ShiroUtils.getUserId());
    }

    /**
     * 查看详细信息 TODO
     *
     * @return
     */
    @GetMapping("/peopleInfo")
    @ApiOperation(value = "获取所有人注册的信息列表（包括工程师和工人）",httpMethod = "GET")
    @OperateCut(content = "查看所有注册人员的信息")
    public Result peopleInfo(){
        //  ... 待返回人员的详细信息
        return null;
    }
}
